version: '3.8'

services:
  db:
    container_name: db
    restart: always
    image: postgres:16.3-alpine3.19
    ports:
      - "5434:5432"
    environment:
      POSTGRES_PASSWORD: postgres
      POSTGRES_USER: postgres
      POSTGRES_DB: postgres
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U postgres" ]
      interval: 30s
      timeout: 30s
      retries: 3
